package com.mq.mqserver.mapper;


import com.mq.mqserver.core.Binding;
import com.mq.mqserver.core.Exchange;
import com.mq.mqserver.core.MSGQueue;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 初始化 核心数据
 */
@Mapper
public interface MeatMapper {
    //创建交换机,队列,绑定关系
    void createExchangeTable();
    void createQueueTable();
    void createBindingTable();

    //插入和删除 查找
    void insertExchange(Exchange exchange);
    List<Exchange> selectAllExchanges();
    void deleteExchange(String exchangeName);

    void insertQueue(MSGQueue queue);
    List<MSGQueue> selectAllQueues();
    void deleteQueue(String queueName);

    void insertBinding(Binding binding);
    List<Binding> selectAllBindings();
    void deleteBinding(String bindingKey);


}
